Reading serial data from arduino: Code works..on re run it errors